package com.lbw.singleton;

/**
 * @author lbw
 * @version 1.0
 * @date 2021/9/4 22:50
 * 懒汉式, 当第一次请求是创建, 采用懒加载
 * 此方法线程不安全
 */
public class Singleton3 {
    private static Singleton3 INSTANCE;

    private Singleton3() {
    }

    public static Singleton3 getInstance() {
        if (INSTANCE == null) {

            INSTANCE = new Singleton3();
        }
        return INSTANCE;
    }
}
